package com.jch.dm.chapter_17_observer;

/**
 * @author: Administrator
 * @create: 2020/04/08 11:56
 **/
public class Main {

    public static void main(String[] args) {
        NumberGenerator generator = new RandomNumberGenerator();
        Observer observer1 = new DigitObserver();
        Observer observer2 = new GraphObserver();
        generator.addObserver(observer1);
        generator.addObserver(observer2);
        generator.execute();
    }
}
